import sys
import cv2 as cv
import numpy as np

img = cv.imread('left06.jpg')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)

sift = cv.xfeatures2d.SIFT_create()

keypoints, descriptor = sift.detectAndCompute(gray, None)

img = cv.drawKeypoints(image=img, outImage=img,keypoints=keypoints,flags=cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS,color=(0,0,255))
cv.imshow('sift_keypoints', img)

if cv.waitKey(0) & 0xff == ord("q"):
    cv.destroyAllWindows()
